{extend name="../template/admin/base.html" /}
{block name="index_right"}
<ul class="nav nav-tabs" role="tablist">
    <li ><a href="{:url('admin/category/index')}">栏目列表</a></li>
    <li class="active"><a href="{:url('admin/category/post')}">{$oldData['cate_id']?'栏目编辑':'栏目添加'}</a></li>
</ul>


<form action="" method="POST" class="form-horizontal" role="form">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">栏目管理</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">栏目名称</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="cate_name" value="{$model['cate_name']? :'';}">
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">所属栏目</label>
                <div class="col-sm-10">
                    <select name="pid" id="inputID" class="form-control">
                        <option value="0"> 顶级栏目</option>
                        {volist name='oldData' id='vo'}
                        <option {if condition="$model['pid']==$vo['cate_id']"}selected{/if} value="{$vo['cate_id']}"> {$vo['_cate_name']}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">栏目排序</label>
                <div class="col-sm-10">
                    <input type="number" class="form-control" name="cate_sort" value="{$model['cate_sort']}">
                </div>
            </div>
        </div>
    </div>
    <button class="btn btn-primary">提交</button>
</form>


{/block}